#ifndef YCTABLEDELEGATE_H
#define YCTABLEDELEGATE_H
#include "yctablemodel.h"

#include <QItemDelegate>
#include <QWidget>
#include <QTableView>

class YCTableDelegate : public QItemDelegate
{
    Q_OBJECT
public:
    explicit YCTableDelegate(QObject *parent = NULL,QTableView* v = NULL,YCTableModel* m = NULL);
    QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, \
                            const QModelIndex &index) const;
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
    void setModelData(QWidget *editor, QAbstractItemModel *model, \
                            const QModelIndex &index) const;
    void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,\
                            const QModelIndex &index) const;
signals:

public slots:
    void line_slot();
private:
    QTableView* view;
    YCTableModel* mode;
};

#endif // YCTABLEDELEGATE_H
